Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce opportunistic automatic horizontal scroll #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

akihikodaki
Copy link

tl; dr: The old algorithm made a large amount of automatic horizontal
scroll in some scenarios and hurt usability. Introduce a new
"opportunistic" algorithm that horizontally scrolls to the extent that
will show more of pipeline stages.

Konata automatically scrolls horizontally when the user inputs a
vertical scroll. Previously, the amount of automatic horizontal scroll
was determined by the difference between the fetch timing of the op at
the top before the vertical scroll and one of the op at the top after
the vertical scroll.

The old algorithm resulted in an excessive scroll when the fetch
timing difference is large. For example, think of a scenario that
an op immediately after a branch misprediction is at the top. You
naturally scroll upward to see what happened just before the op, but
since the mispredicted branch was fetched much earlier, the old
algorithm decides to travel to the past too distant, and you miss the
pipeline stages you intended to observe. There will be completely
unobservable regions in the worst scenario where branch mispredictions
frequently happen.

By contrast, the new algorithm behaves opportunistically; it
horizontally scrolls only if there is some margin and scrolling will
show more of pipeline stages, hence immune to excessive scroll in the
scenario described earlier.

The new algorithm also preserves a margin present before the vertical
scroll because a user may want to display somewhere away from the
currently active pipeline because the user is interested in another
pipeline shown in the transparent mode.

tl; dr: The old algorithm made a large amount of automatic horizontal
scroll in some scenarios and hurt usability. Introduce a new
"opportunistic" algorithm that horizontally scrolls to the extent that
will show more of pipeline stages.

Konata automatically scrolls horizontally when the user inputs a
vertical scroll. Previously, the amount of automatic horizontal scroll
was determined by the difference between the fetch timing of the op at
the top before the vertical scroll and one of the op at the top after
the vertical scroll.

The old algorithm resulted in an excessive scroll when the fetch
timing difference is large. For example, think of a scenario that
an op immediately after a branch misprediction is at the top. You
naturally scroll upward to see what happened just before the op, but
since the mispredicted branch was fetched much earlier, the old
algorithm decides to travel to the past too distant, and you miss the
pipeline stages you intended to observe. There will be completely
unobservable regions in the worst scenario where branch mispredictions
frequently happen.

By contrast, the new algorithm behaves opportunistically; it
horizontally scrolls only if there is some margin and scrolling will
show more of pipeline stages, hence immune to excessive scroll in the
scenario described earlier.

The new algorithm also preserves a margin present before the vertical
scroll because a user may want to display somewhere away from the
currently active pipeline because the user is interested in another
pipeline shown in the transparent mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant